/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TableAction.java
 *
 * Created on 2010-10-31, 23:13:11
 */

package com.weed.components;

/**
 *
 * @author Jason
 */
public class TableAction extends javax.swing.JPanel {

    /** Creates new form TableAction */
    public TableAction() {
        initComponents();
        this.defaultDataSet1.submit();
        rTable1.configureEnclosingScrollPane();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        defaultDataSet1 = new com.weed.client.bind.DefaultDataSet();
        defaultDataSrc1 = new com.weed.client.bind.DefaultDataSrc();
        testDataSource1 = new com.weed.client.bind.TestDataSource();
        rDBToolBar1 = new com.weed.client.component.RDBToolBar();
        rScrollPane1 = new com.weed.client.component.ext.RScrollPane();
        rTable1 = new com.weed.client.component.RTable();
        rPage1 = new com.weed.client.component.RPage();

        defaultDataSet1.setSource(testDataSource1);

        rDBToolBar1.setRollover(true);
        rDBToolBar1.setDataSet(defaultDataSet1);

        rScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        rScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
        rScrollPane1.setHeaderIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rScrollPane1.setHeaderText("菜单功能配置");
        rScrollPane1.setHorizontalScrollBar(null);

        rTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        rTable1.setDataSet(defaultDataSet1);
        rScrollPane1.setViewportView(rTable1);

        rPage1.setRollover(true);
        rPage1.setDataSet(defaultDataSet1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rPage1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
                    .addComponent(rScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
                    .addComponent(rDBToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rDBToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 399, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rPage1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.weed.client.bind.DefaultDataSet defaultDataSet1;
    private com.weed.client.bind.DefaultDataSrc defaultDataSrc1;
    private javax.swing.JScrollPane jScrollPane1;
    private com.weed.client.component.RDBToolBar rDBToolBar1;
    private com.weed.client.component.RPage rPage1;
    private com.weed.client.component.ext.RScrollPane rScrollPane1;
    private com.weed.client.component.RTable rTable1;
    private com.weed.client.bind.TestDataSource testDataSource1;
    // End of variables declaration//GEN-END:variables

}
